<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>导航条</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
		<link rel="shortcut icon" href="img/favicon.ico">
	</head>
	<body ng-app="myapp">
		<nav class="navbar navbar-default" ng-controller="navController" ng-init="loadTopLevelCategory();checkUserStatus();">
			<div class="container-fluid">
				<div class="navbar-header">
					<a class="navbar-brand" href="1index.html">首页</a>
				</div>
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="active" ng-repeat="category in topCategorys">
						<a href="#?id={{category.id}}">{{category.name}} </a>
						</li>
					</ul>
					<form class="navbar-form navbar-left">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="商品">
						</div>
						<button type="submit" class="btn btn-default">查询</button>
					</form>
					<ul class="nav navbar-nav navbar-right">
					    <li><a href="2login.html">登录</a></li>
						<li><a href="3register.html">注册</a></li>
						<li><a href="#">{{user.username}}</a></li>
						<li><a><button ng-click="logout();">退出</button></a></li>
						<li><a href="5car.html">购物车</a></li>
					</ul>
				</div><!-- /.navbar-collapse -->
			</div><!-- /.container-fluid -->
		</nav>
	</body>
	<script src="js/angularjs/angular.min.1.5.8.js"></script>
	<script src="js/base/base.js"></script>
	<script src="js/service/categoryService.js"></script>
	<script src="js/controller/navController.js"></script>
</html>
